package com.wthink.hzgj.util

object NetconfigUtil {

    fun parseType(parse: Int): String {
        when (parse) {
            0 -> return "主服务器"
            1 -> return "备服务器"
            2 -> return "镜像服务器"
        }
        return ""
    }

    fun parseTypeInt(parse: String): Int {
        when (parse) {
            "主服务器" -> return 0
            "备服务器" -> return 1
            "镜像服务器" -> return 2
        }
        return -99
    }

    fun parseVendor(parse: Int): String {
        when (parse) {
            0 -> return "未知平台"
            1 -> return "罗格自有平台"
            2 -> return "博实结平台"
            3 -> return "山东九通平台"
            4 -> return "河南玖和平台"
            5 -> return "南通汽运"
            6 -> return "部标测试平台"
            7 -> return "新疆服务器"
            8 -> return "三宝平台"
            9 -> return "杭州公交"
            10 -> return "北斗平台"
        }
        return ""
    }

    fun parseVendorInt(parse: String): Int{
        when (parse) {
            "主服务器" -> return 0
            "备服务器" -> return 1
            "镜像服务器" -> return 2
        }
        return -99
    }

    fun parseStatus(parse: Int): String {
        when (parse) {
            0 -> return "离线"
            1 -> return "连接中"
            2 -> return "已连接"
            3 -> return "建立连接"
            4 -> return "注册"
            5 -> return "鉴权"
            6 -> return "在线"
        }
        return ""
    }

    fun parseProtocol(parse: Int): String {
        when (parse) {
            0 -> return "未知协议"
            1 -> return "808协议"
        }
        return ""
    }

    fun parsePlatform_type(parse: Int): String {
        when (parse) {
            0 -> return "未知平台"
            1 -> return "调度平台"
            2 -> return "视频平台"
        }
        return ""
    }
}